import ITransformable from "./ITransformable";
import IRenderState from "./IRenderState";

export default interface IDrawable {
    // 用于draw之前的操作，例如渲染状态进栈、设置各个渲染状态值及设置当前变换矩阵
    beginDraw(transformable: ITransformable, state: IRenderState, context: CanvasRenderingContext2D): void;
    // 用于形体的绘制操作
    draw(transformable: ITransformable, state: IRenderState, context: CanvasRenderingContext2D): void;
    endDraw(transformable: ITransformable, state: IRenderState, context: CanvasRenderingContext2D): void;
}